package com.ssy.lingxi.pay.controller.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.pay.api.model.vo.request.CreditBillInitVO;
import com.ssy.lingxi.pay.service.ICreditBillService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @menu 支付与结算能力-授信账单
 * @author 伍将
 * @date 2020/8/21
 * @version 2.0.0
 */
@RestController
@RequestMapping("/pay/creditBill/feign")
public class CreditBillFeignController {

    @Resource
    private ICreditBillService billService;

    /**
     * 初始化账单
     * @author 伍将
     * @date 2020/8/21
     **/
    @RequestMapping("/init")
    public Wrapper<Void> init(@RequestBody @Valid CreditBillInitVO initVO) {
        return billService.init(initVO);
    }

    /**
     *  初始化逾期账单
     * @author 伍将
     * @date 2020/8/28
     **/
    @RequestMapping("/initOverdue")
    public Wrapper<Void> initOverdue(@RequestBody @Valid CreditBillInitVO initVO) {
        return billService.initOverdue(initVO);
    }
}
